package ${escapeKotlinIdentifiers(packageName)}.${escapeKotlinIdentifiers(adapterPackage)}

import android.content.Context
import android.view.View
import androidx.recyclerview.widget.RecyclerView
import cn.xuexuan.mvvm.adapter.SimpleRecAdapter
import ${escapeKotlinIdentifiers(packageName)}.R
import ${escapeKotlinIdentifiers(packageName)}.model.bean.${modelClass}

/**
 * create by xuexuan
 * 还是来自薛瑄独创的自定义模板
 */
class ${adapterClass}(context: Context,clickListener:(String)-> Unit) : SimpleRecAdapter<${modelClass}, ${adapterClass}.ViewHolder>(context) {
    override val layoutId: Int get() = R.layout.${itemLayout}

    override fun newViewHolder(itemView: View): ViewHolder {
        return ViewHolder(itemView!!)
    }

    override fun onBindViewHolder(holder: ViewHolder, position: Int) {
        holder.bind(data[position], position)
		holder.itemView.setOnClickListener {
            if (null != recItemClick) {
                recItemClick.onItemClick(position, data[position], 0, holder)
            }
        }
		
    }


    inner class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
        fun bind(info: ${modelClass}, position: Int) {
        // itemView.tv_number.text = info
            
        }
    }


}